package com.jerry.base.io.file;

import lombok.extern.slf4j.Slf4j;
import org.junit.Test;

import java.io.File;

/**
 * Created with IntelliJ IDEA
 * User: Jerry
 * Date: 2024/1/22
 * Time: 21:17
 * Description:
 */
@Slf4j
public class FileInformation {

    @Test
    public void info() {
        File file = new File("src/main/resources/io/create.txt");
        log.info("getName()：" + file.getName());
        log.info("getAbsoluteFile()：" + file.getAbsoluteFile());
        log.info("getParent()：" + file.getParent());
        log.info("length()：" + file.length());
        log.info("exists()：" + file.exists());
        log.info("isFile()：" + file.isFile());
        log.info("isDirectory()：" + file.isDirectory());
    }
}
